<?php

if (preg_match('/\d+/', $_SERVER['REQUEST_URI'], $matches)) {
    list($id) = $matches;
}

$dh = opendir($id);
while ($file = readdir($dh)) {
    if (preg_match('/^(index-.+\.html)$/', $file, $matches)) {
        list(, $index) = $matches;
        break;
    }
}
closedir($dh);

header('Content-type: text/html; charset=UTF-8');

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <title>Neoliberals: Reclaiming a lost word</title>
        <link rel="stylesheet" href="/style.css?<?php echo $id; ?>" type="text/css" />
    </head>
    <body>
        <?php
        
        include "$id/$index";
        
        ?>
        <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
        </script>
        <script type="text/javascript">
        _uacct = "UA-511628-9";
        urchinTracker();
        </script>
    </body>
</html>
